package com.ztesoft.ossup.report.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

/**
 * Created by luxiang on 16/9/27.
 */
@Entity
public class ReportSub implements Serializable{
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="REPORT_SUB_SEQ")
    @SequenceGenerator(name="REPORT_SUB_SEQ", sequenceName = "REPORT_SUB_SEQ")
    Long id;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "reportId", referencedColumnName = "id")
    public Report report;
    
    @Column(nullable = false, length = 128)
    String name;
    
    //字段类型 101 曲线图 102 柱状图  103饼状图
    @Column(nullable = false, length = 10)
    public String type;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Report getReport() {
		return report;
	}

	public void setReport(Report report) {
		this.report = report;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
